package com.yyge.web.servlet;
import com.yyge.dto.sys_userDto;
import com.yyge.entity.sys_user;
import com.yyge.service.sys_userService;
import com.yyge.service.impl.sys_userServiceImpl;
import com.yyge.util.ServletUtil;
import com.yyge.vo.R;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
import java.util.List;

@WebServlet("/select/")
public class sys_userServlet extends HttpServlet {
    private sys_userService service=new sys_userServiceImpl();
    private static Logger logger= LoggerFactory.getLogger(sys_userServlet.class);

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        // 将request请求中获取url参数，并构建为GoodsInfoDto的对象
        // GoodsInfoDto对象中包含了分页查询的条件和页码等参数
        sys_userDto dto= ServletUtil.parameter2dto(req,sys_userDto.class);
        R r=service.selectAll(dto);
        ServletUtil.writeResult2Client(resp,r);
    }
    
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

    }
}
